<!-- review 页面内容 -->
<section class="review" ng-controller="reviewCtrl">
    <div class="row top-buttons">
        <button class="btn btn-default yf-shadow hidden-xs" ng-class="{'active': type == 1}" ng-click="setType(1);setHistroy(false, 1);">{{user.user_type == 'finance' ? '待支付': '待审核'}}</button>
        <button class="btn btn-default yf-shadow hidden-xs" ng-class="{'active': type == 3}" ng-click="setType(3);setHistroy(false, 3);">待确认</button>
        <button class="btn btn-default yf-shadow hidden-xs" ng-class="{'active': type == 2}" ng-click="setType(2);setHistroy(true, 2);">历史订单</button>
        <button class="btn btn-default yf-shadow hidden-xs" ng-class="{'active': type == 4}" ng-click="setType(4);setHistroy(false, 1);" ng-if="user.user_type=='manager'">待支付</button>
        <form class="col-sm-5 col-xs-12 pull-right search-input">
            <div class="from-group">
                <button down-file="web/orders" down-file-type="xlsx" now-token="nowToken" search-data='daoDate' class="pull-right export">导出</button>
                <button class="pull-right" data-toggle="modal" data-target="#search-modal"><i class="icon-search"></i>订单搜索</button>
            </div>
        </form>
    </div>
    <empty data='appointOrders'></empty>
    <ul class="list-group">
        <li class="list-group-item yf-shadow" ng-repeat="order in appointOrders track by $index">
            <!-- <order-label state='order.mount_order'></order-label> -->
            <div class="row">
                <!-- <div class="col col-md-8 col-sm-8 col-xs-8 order-info" ui-sref='mine.revieworder({ id: order.id })'> -->
                <div class="col col-md-8 col-sm-8 col-xs-8 order-info" ui-sref="reviewDetail({id: order.id})">

                    <div>
                        <div class="title">订单号: {{ order.serial_number }}</div>
                        <!-- <p class="income">本单收入 <span>￥{{ order.total }}</span></p> -->
                        <p class="info">预估面积: {{order.square}}(㎡) | 品牌: {{order.company_name}}</p>
                    </div>
                    <a ng-class="{'dis': user_role != 2}" class="address" ng-click="goMap(user_role, order.id);">
                        <span class="glyphicon glyphicon-map-marker"></span> {{ order.address }}
                    </a>
                    <!-- <div class="text-right" ng-if="['installed', 'completed'].indexOf(order.workflow_state) == -1">
                        <a type='button' class="c1" ui-sref="mine.changeorder({id: order.id, isreview: 1})">修改</a>
                    </div> -->
                </div>
                <div class="col col-md-4 col-sm-4 col-xs-4 server-info" ui-sref='merchant({ id: order.facilitator_id })'>
                    <img class="img-circle" ng-src="{{ order.service_info.image }}" onerror="this.src='components/mine/imgs/image.jpg'">
                    <p class="name">
                        {{ order.service_info.name }}
                        <i class="icon-renzheng" ng-if='user_role != 0'></i>
                        <span>服务商</span>
                    </p>
                    <p class="rate">
                        <star len='order.service_info.raty'></star>
                        {{ order.service_info.orders_count }}单
                    </p>
                </div>
            </div>
        </li>
    </ul>
    <!-- <nav ng-show="appointOrders && appointOrders.length != 0 && page.total_count > limit">
        <ul class="pager pager-sm yf-pager">
            <li>
                <a class="btn btn-default" ng-disabled="!((page.current_page - 1) >= 1)" ng-click="getNext(page.current_page - 1);">上一页</a>
            </li>
            <li>
                <a class="btn btn-default" ng-disabled="!page.next_page" ng-click="getNext(page.next_page);">下一页</a>
            </li>
        </ul>
    </nav> -->
    <nav ng-show="appointOrders && appointOrders.length != 0 && page.total_count > page.current_total" style="text-align: center;">
        <ul uib-pagination total-items="page.total_count" items-per-page='page.current_total' ng-model="page.current_page" ng-change="getNext(page.current_page);" max-size="maxSize" class="pagination-sm" boundary-links="true" force-ellipses="true" next-text="下一页" last-text="尾页" previous-text="上一页" first-text="首页"></ul>
    </nav>
    <div class="modal fade common-modal" id="search-modal" tabindex="-1" role="dialog" aria-labelledby="common-modal">
        <div class="modal-dialog" role="document">
            <div class="modal-content yf-shadow">
                <div class="modal-header text-center">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title" id="common-modal">
                          订单搜索
                        </h3>
                </div>
                <div class="modal-body">
                  <div class="row">
                      <div class="form-group col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-lg-10 col-md-10 col-sm-10 col-xs-12">
                          <label for="">起止时间</label>
                          <input type="text" class="form-control startTime mt_input" id="start-date" placeholder="请选择开始时间">
                          <input type="text" class="form-control endTime mt_input" id="start-date" disabled placeholder="请结束开始时间">
                      </div>
                      <div class="form-group col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-lg-10 col-md-10 col-sm-10 col-xs-12">
                          <label for="">关键字搜索</label>
                          <input type="text" class="form-control mt_input" id="order-num" ng-model='q' placeholder="订单号、服务商名称、品牌商名称、省市区、渠道">
                      </div>
                      <div class="col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-lg-10 col-md-10 col-sm-10 col-xs-12">
                          <button type="submit" class="btn btn-block mt_group_btn" ng-click="searchOrder();">确认搜索</button>
                      </div>
                  </div>
                </div>
            </div>
        </div>
    </div>
</section>
